package cn.yunhe.dao;

import cn.yunhe.entity.Department;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface DepartmentDao {

    /**
     * 获取所有班级
     * @return
     */
    List<Department> getAllDep();

    /**
     * 根据名称查询班级(批量新增时,根据班级名获取id)
     * @param name
     * @return
     */
    Department getDepByName(String name);

    /**
     * 增
     * @param department
     */
    int addDepartment(Department department);

    /**
     * 删
     * @param department
     */
    int delDepartment(Department department);

    /**
     * 改
     * @param department
     */
    int updDepartment(Department department);

    /**
     * 根据id查标签
     * @param department
     * @return
     */
    Department getDepartmentById(Department department);

    /**
     * 查询所有
     * @param map
     * @return
     */
    List<Department> getDepartmentListByPage(Map<String, Object> map);


    /**
     * 总条数
     * @param map
     * @return
     */
    int getDepartmentListCountByPage(Map<String, Object> map);
}